﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="OnlineAddPoint.aspx.cs" Inherits="Agent_OnlineAddPoint" %>
<html>
<head id="Head1" runat="server">
<title>在线购卡充值</title>
<script type="text/javascript" src="../script/jquery.js"></script>
<style>
Body
{
	FONT-FAMILY: "Verdana, Arial, 宋体";
	FONT-SIZE: 9pt;
	text-decoration: none;
	line-height: 150%;
	background-color: #FFFFFF;
	color: #cccccc;
	FONT-SIZE: 9pt;
   SCROLLBAR-FACE-COLOR: #cccccc;
	SCROLLBAR-HIGHLIGHT-COLOR: #cccccc;
	SCROLLBAR-SHADOW-COLOR: #cccccc;
	SCROLLBAR-3DLIGHT-COLOR: #cccccc;
	SCROLLBAR-ARROW-COLOR: #555555;
	SCROLLBAR-TRACK-COLOR: #555555;
	SCROLLBAR-DARKSHADOW-COLOR: #cccccc;
}
Td
{
	FONT-FAMILY: "Verdana, Arial, 宋体";
	FONT-SIZE: 9pt;
	color: #555555;
}
Input
{
	FONT-FAMILY: "Verdana, Arial, 宋体";
	FONT-SIZE: 9pt;
	color: #555555;
	background-color: #fefefe;
	border: 1px solid #555555;
}
checkbox
{
	FONT-FAMILY: "Verdana, Arial, 宋体";
	FONT-SIZE: 9pt;
	color: #555555;
	border: 0px;
}
Textarea
{
	FONT-FAMILY: "Verdana, Arial, 宋体";
	FONT-SIZE: 9pt;
	color: #555555;
	background-color: #fefefe;
	border: 1px solid #555555;
}
Button
{
	FONT-FAMILY: "Verdana, Arial, 宋体";
	FONT-SIZE: 9pt;
	color: #555555;
	background-color: #cccccc;
	border: 1px solid #555555;
}
Select
{
	FONT-FAMILY: "Verdana, Arial, 宋体";
	FONT-SIZE: 9pt;
	color: #555555;
	background-color: #fefefe;
	border: 1px solid #555555;
}
A
{
	TEXT-DECORATION: none;
	color: #555555;
}
A:hover
{
	COLOR: #ff6600;
	text-decoration: underline;
}
.title
{
	background: url(Images/topBar_bg.gif);
	color: #ff6600;
	padding: 4px 8px;	
	height: 28px;
}
.border
{
	border: 2px solid #555555;
}
.tdbg
{
	FONT-FAMILY: "Verdana, Arial, 宋体";
	background-color: #eeeeee;	
	color: #555555;
	padding: 4px 8px;
}
.topbg
{
	background: url(Images/topBar_bg.gif);
	color: #ff6600;
	padding: 4px 8px;	
	height: 28px;
}
.bgcolor
{
	background-color: #fefefe;
}
.Glow
{
FILTER: Glow(Color=0733B2, Strength=1) dropshadow(Color=0733B2, OffX=1, OffY=1,); WIDTH: 100%; COLOR: #ffffff; LINE-HEIGHT: 20px
}
.dishu{
color:#333333;
background-color:#cccccc;}
</style>
<script type="text/javascript">
function checkform(type,objlink){
	if(confirm("你是否真的需要删除此信息?")){
		if(type==1){
			window.location.href=objlink;
		}
		else{
			return true
		}
	
	}
	else{
		return false;
	}
		
}
function CheckForm()
{
	if(document.form.cardtype.value=="0")
	{
		alert("请选择购卡类型！");
		document.form.cardtype.focus();
		return false;
	}
	if(document.form.v_amount.value=="")
	{
		alert("请输入购买点数！");
		document.form.v_amount.focus();
		return false;
	}
}
function CheckForm1()
{
	if(document.form1.kahao.value=="")
	{
		alert("请输入卡号！");
		document.form1.kahao.focus();
		return false;
	}
	if(document.form1.mima.value=="")
	{
		alert("请输入密码！");
		document.form1.mima.focus();
		return false;
	}
	return true;
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table cellpadding="0" cellspacing="1" border="0" width="100%"  align=center>
<form name="form" action="<%=configInfo.InstallDir %>Send.aspx" method="post" onSubmit="return CheckForm();">
    <input type="hidden" id="usertype" name="usertype" value='1' />
    <input type="hidden" id="userid" name="userid" value='<%=userid %>' />
    <tr>
	  <td colspan="2" align="center" class="title"><strong>在 线 购 卡</strong></td>
    </tr>
    <tr class="tdbg">

      <td width=90 >购卡类型：</td>
      <td><select name="cardtype" id="cardtype">
			<option value='0'>选择购卡类型</option>
			<option value='1'>购买充值点数</option>
      </select>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FF6600">注：</font>慎重选择购卡类型，只有与你计费方式一致才能成功进行充值。</td>
    </tr>

    <tr class="tdbg">
      <td width=90>	 
	 购买点数：</td>
      <td><input type="text" name="v_amount" class="input" />
      &nbsp<font color="#FF6600">*</font>&nbsp;整数（1-2000）</td>
    </tr>
    <tr class="tdbg">
      <td colspan=2 align=center>

         <input name="Action" type="hidden" id="Action" value="chkgm">
         <input type="submit" name="Submit" value=" 确&nbsp;&nbsp;定 " style="cursor: hand;background-color: #cccccc;">&nbsp;&nbsp&nbsp
         <input type=reset name="reset" value=" 清&nbsp;&nbsp;除 " style="cursor: hand;background-color: #cccccc;">
		 <br>
	  </td>
    </tr>
  </form>
</table>
  <table width=100% align=center border=0 cellpadding="0" cellspacing="1">

<form name="form1"  method="post" >
    <tr>
      <td align=center colspan=2 class="title"><strong>在 线 充 值</strong></td>
    </tr>
    <tr class="tdbg">
      <td width=90 >卡号：</td>
      <td><input type="text" name="kahao" id="kahao" class="input">&nbsp<font color="#FF6600" />*</font>&nbsp区分大小写</td>

    </tr>
    <tr class="tdbg">
      <td width=90>密码：</td>
      <td><input type=password name="mima" id="mima" class="input" />&nbsp<font color="#FF6600">*</font>&nbsp区分大小写</td>
    </tr>
    <tr class="tdbg">
      <td colspan=2 align=center>

         <input name="Action" type="hidden" id="Action" value="czok">
         <input type="button" name="Submit" onclick="sub();" value=" 确&nbsp;&nbsp;定 " style="cursor: hand;background-color: #cccccc;" />&nbsp;&nbsp;&nbsp
         <input type=reset name="reset" value=" 清&nbsp;&nbsp;除 " style="cursor: hand;background-color: #cccccc;" /></td>
    </tr>
	</form>
</table>


</body>
<script type="text/javascript">
    function sub()
    {
        
        if(CheckForm1())
        {
            $.post("<%=configInfo.InstallDir %>UseCardPay.aspx", {userid:'<%=userid %>',usertype:1,kahao:$("#kahao").val(), mima: $("#mima").val()},
              function(data){
                alert(data);
                $("#kahao").attr("value","");
                $("#mima").attr("value","");
              }); 
              
            //parent.window.location.href="<%=configInfo.InstallDir %>UseCardPay.aspx?kahao="+$("#kahao").val()+"&mima="+$("#mima").val();
        }
        
        
    }
</script>
</html>
